package com.why.jvm.hotspot.src.share.vm.oops.constants;

import lombok.Data;

/**
 * @author xiaoTian
 * @date 2022/7/22 14:05
 * @Description:
 */
@Data
public class ConstantClass extends ConstantInfoBase{



    private int nameIndex;

    private String name;

    public String getName(){
        return ((ConstantUtf8Info) getConstantPool().getConstantPoolMap().get(nameIndex)).getValue();
    }

    @Override
    public String toString() {
        return "ConstantClass{" +
                "nameIndex=" + nameIndex +
                ", value='" + getName() + '\'' +
                '}';
    }
}
